/*
 *    Copyright (c) 2018-2025, bfcloud All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: bfcloud
 */

import request from '@/router/axios'

//填报发起的详情页面，显示所有机构数据
export function fetchList(query) {
  return request({
    url: '/appr-contract/hetonghtjgtb/getPageByjg',
    method: 'get',
    params: query
  })
}
//填报发起的详情页面，显示所有机构数据
export function fetchListByNdId(query) {
  return request({
    url: '/appr-contract/hetonghtjgtb/getPageByjgAndNdId',
    method: 'get',
    params: query
  })
}


export function fetchListjg(query) {
  return request({
    url: '/appr-contract/hetonghtjgtb/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/appr-contract/hetonghtzb',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/appr-contract/hetonghtzb/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/appr-contract/hetonghtzb/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/appr-contract/hetonghttbfq/calcuScore',
    method: 'put',
    data: obj
  })
}
export function submitjiaList(obj) {
  return request({
    url: '/appr-contract/hetonghttbfq/calcuScore',
    method: 'put',
    data: obj
  })
}
// 获取模板下拉
export function getListMb(query){
  return request({
    url: '/appr-contract/hetongacttemplate/getList',
    method: 'get',
    params: query
  })
}

export function confirmStatus(id) {
  return request({
    url: '/appr-contract/hetonghttbfq/confirmStatus/'+id,
    method: 'get'
  })
}

export function confirmTianbao(id) {
  return request({
    url: '/appr-contract/hetonghttbfq/updateTbzbStatus/'+id,
    method: 'put'
  })
}

export function conYtbfrac(id) {
  return request({
    url: '/appr-contract/hetonghttbfq/conYtbfrac/'+id,
    method: 'get'
  })
}

export function jgtbExportExcel(query) {
  return request({
    url: '/appr-contract/hetonghtjgtb/jgtbExportExcel',
    method: 'post',
    data: query,
    responseType: 'blob'
  })
}

export function handleSubmitAll(query) {
  return request({
    url: '/appr-contract/hetonghttbfq/handleSubmitAll', 
    method: 'post',
    data: query
  })
}

export function handleSubmitAllByht(query) {
  return request({
    url: '/appr-contract/hetonghttbfq/handleSubmitAllByht',
    method: 'post',
    data: query
  })
}

export function confirmTianbaoAll(query) {
  return request({
    url: '/appr-contract/hetonghttbfq/confirmTianbaoAll',
    method: 'get',
    params: query
  })
}

export function dataFormjiaSubmitAll(query) {
  return request({
    url: '/appr-contract/hetonghttbfq/dataFormjiaSubmitAll',
    method: 'post',
    data: query
  })
}
